#!/usr/bin/env python3
import requests
urls = ["http://site1.com", "https://site2.com"]
for url in urls:
    try:
        r = requests.get(url, timeout=5)
        if r.status_code != 200:
            print(f"故障: {url} (状态码: {r.status_code})")
    except Exception as e:
        print(f"故障: {url} ({str(e)})")